package com.lxp.project.system.service;

import com.lxp.framework.web.domain.AjaxResult;
import com.lxp.framework.web.page.TableDataInfo;
import com.lxp.project.system.domain.SysUpload;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 附件-公用Service接口
 *
 * @author equipment
 * @date 2020-08-20
 */
public interface ISysUploadService {
    //分页查询数据
    public TableDataInfo getPageList(SysUpload model, TableDataInfo tableSupport);

    //上传
    public AjaxResult upload(SysUpload document,MultipartFile file);

    //文件删除
    public AjaxResult deleteFile(String id);

    //图片预览
    public ResponseEntity pictureShow(String id, String filePath);

    //图片查看
    public void imageShow(String id, String filePath, HttpServletResponse response) throws IOException;

    //删除数据
    public AjaxResult deleteById(String id);

    //保存
    public AjaxResult save(SysUpload model);

    //修改
    public AjaxResult update(SysUpload model);

    //获取 所有数据
    public List<SysUpload> getListAll();

    public AjaxResult getListByBusinessId(String filetype, String businessid);

    //获得一条数据
    public SysUpload findById(String id);
    public SysUpload findByBusinessId(Long businessid);

}
